<template>
  <div>
        <vbanner v-bind:banner="slideData"></vbanner>
        <vmenu v-bind:menu="menuData"></vmenu>
  </div>
</template>

<script>
import vbanner from './banner';
import vmenu from './menu';

export default {
    components:{
      vmenu,
      vbanner
    },
    data(){
      return {
        menuData:[],
        slideData:[]
      }
    },
    methods:{
      request (){
        this.$http({
          url:"http://h5.yztctech.net/api/axf/apihome.php",
          method:"get"
        }).then(function (res) {
          console.log(res)
         this.slideData = res.body.data.slide;
         this.menuData = res.body.data.menu;
        })
      }
    },
    mounted () {
      this.request();
    }
  }
</script>
